//
//  LYDatePickerView.h
//  Oscar
//
//  Created by cqck on 2018/11/2.
//  Copyright © 2018 cqck. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void(^LYDatePickerResultCallback)(NSString *result);

typedef NS_ENUM(NSInteger, LYDatePickerViewMode) {
    LYDatePickerViewDateYearMode = 1,//年
    LYDatePickerViewDateYearMonthMode,//年月
    LYDatePickerViewDateYearMonthDayMode,//年月日
    LYDatePickerViewDateYearMonthDayHourMode,//年月日,时
    LYDatePickerViewDateYearMonthDayHourMinuteMode,//年月日,时分
    LYDatePickerViewDateYearMonthDayHourMinuteSecondMode,//年月日,时分秒
    LYDatePickerViewDateHourMinuteSecondMode,//时分秒
    LYDatePickerViewDateHourMinuteMode,//时分
};

NS_ASSUME_NONNULL_BEGIN

@interface LYDatePickerView : UIPickerView

@property (nonatomic, copy) NSString *selectDateStr;

/*!
 * @brief 初始化日期选择控件
 * @param callback        选中时间回调
 *
 */
- (instancetype)initWithSelect:(LYDatePickerResultCallback)callback;

/*!
 * @brief 设置日期选择模式
 * @param mode            日期选择模式
 *
 */
- (void)setPickerViewMode:(LYDatePickerViewMode)mode;

/*!
 * @brief 设置当前时间
 *
 */
- (void)setCurrentDate;

@end

NS_ASSUME_NONNULL_END
